{
语法百题 解题报告：
 http://git.oschina.net/et0662/sznoi-grammar/ 
}
var
	s:string;
	c:char;
	i:integer;
begin
	readln(s);
	readln(c);
	for i:= 1 to length(s) do
	begin
		if s[i]<>c then
			write(s[i]);
	end;
	writeln;
end.
